"""
class HotDog:
    def __init__(self):
        self.cooked_level=0
        self.cooked_string="Raw"
        self.condiments=[]
    def __str__(self):
        msg = "热狗"
        if len(self.condiments) > 0:
            msg = msg+"加"
        for i in self.condiments:
            msg = msg+i+", "
        msg = msg.strip(", ")
        msg = self.cooked_string+" "+msg+"."
        return msg
    def cook(self,time):
        self.cooked_level=self.cooked_level+time
        if self.cooked_level>8:
            self.cooked_string="Charcoal"
        elif self.cooked_level>5:
            self.cooked_string="Wwll-done"
        elif self.cooked_level>3:
            self.cooked_string="Medium"
        else:
            self.cooked_string="Raw"
    def addCondiment(self,condiment):
        self.condiments.append(condiment)
dog=HotDog()
print(dog)
print("Cooking hot dog For 4 minutes...")
dog.cook(4)
print(dog)
print("Cooking hot dog For 3 more minutes...")
dog.cook(3)
print(dog)
print("what happens if I cook it for 10 more minutes")
dog.cook(10)
print(dog)
print("Now,I'm going to add some stuff on my hot dog")
dog.addCondiment("ketchup")
dog.addCondiment("mustard")
print(dog)
"""
import pygame,sys
pygame.init()
screen=pygame.display.set_mode([640,640])
screen.fill([255,255,255])
x,y=50,50
pygame.draw.circle(screen,[255,0,0],[x,y],20,0)
pygame.display.flip()
x+=3
pygame.time.delay(50)
pygame.draw.circle(screen,[255,0,0],[x,y],20,0)
pygame.draw.circle(screen,[255,255,255],[x-3,y],20,0)
pygame.display.flip()
running=True
while running:
    for event in pygame.event.get():
        if event.type==pygame.QUIT:
            running=False
        else:
            x+=30
            pygame.time.delay(500)
            pygame.draw.circle(screen,[255,255,255],[x-30,y],20,0)
            pygame.draw.circle(screen,[255,0,0],[x,y],20,0)
            pygame.display.flip()
pygame.quit()